<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Netbook shop</title>
		<%@include file="header.jsp" %>
	</head>
	<body>
		<div id="wrapper">
			<div id="splash">
				<img src="resources/images/pic1.jpg" alt="" />
			</div>
			<div id="menu">
				<ul>				
					<li><a href="index">Homepage</a></li>
					<li><a href="notebooks">Notebooks</a></li>
					<li>Account <span class="arrow"></span>
						<ul>
							<c:choose>
								<c:when test="${ firstname != null }">
									<li class="first"><a href="logout">Logout</a></li>
								</c:when>
								<c:when test="${ firstname == null}">
									<li class="first"><a href="login">Inloggen</a></li>
									<li><a href="registratie">Registreren</a></li>
								</c:when>
							</c:choose>	
						</ul>
					</li>
					<li><a href="about">About</a></li>
					<c:choose>
						<c:when test="${ admin == 0 || admin == null }">
							<li class ="cartI"> <img src="resources/images/shopping_cart.png" alt="" /></li>
							<li class ="cart"><a href="winkelwagen">Winkelwagen</a></li>
						</c:when>
						<c:when test="${ admin == 1 }">
							<li class ="cartI"> <img src="resources/images/adminmodule.png" alt="" /></li>
							<li class ="cart"><a href="admin">Admin module</a></li>
						</c:when>
					</c:choose>		
				</ul>				
				<br class="clearfix" />
			</div>
			
			<div id="page">
				<div id="content">
					<div class="box">
						<h1>Vergelijking notebooks</h1>
						<br />
						<c:forEach items="${products}" var="product" >
							<div class="specfloat">
							<span class="center"><h2>${product.name}</h2></span>
							<table class="CompareList" cellspacing="0" >
								<tr><th colspan="2" >CPU</th></tr>
									<tr>
										<td>Type:</td>
										<td> ${product.cpu.name}</td>
									</tr>
									<tr>
										<td>Cache:</td>
										<td> ${product.cpu.cacheMemory} KB</td>
									</tr>
									<tr>
										<td>Snelheid:</td>
										<td> ${product.cpu.CPUSpeed} MHz</td>
									</tr>
								<tr><th colspan="2" >GPU</th></tr>
									<tr>
										<td>Naam:</td>
										<td>${product.graphicsCard.name}</td>
									</tr>
									<tr>
										<td>Geheugengrootte:</td>
										<td> ${product.graphicsCard.memoryCap} MB</td>
									</tr>
									<tr>
										<td>Videochip:</td>
										<td> ${product.graphicsCard.cpu}</td>
									</tr>
									<tr>
										<td>Snelheid:</td>
										<td> ${product.graphicsCard.maxDataBusSpeed} MHz</td>
									</tr>
								<tr><th colspan="2" >RAM</th></tr>
									<tr>
										<td>Geheugen grootte:</td>
										<td> ${product.ram.memoryCapacity} MB</td>
									</tr>
									<tr>
										<td>Geheugen Type:</td>
										<td> ${product.ram.version}</td>
									</tr>
									<tr>
										<td>Geheugen Snelheid:</td>
										<td> ${product.ram.maxDataBusSpeed} MHz</td>
									</tr>
								<tr><th colspan="2" >HDD</th></tr>
									<tr>
											<td>Opslagcapaciteit:</td>
											<td> ${product.internal_hd.capacityOfStorage} GB</td>
									</tr>
									<tr>
										<td>Access Time:</td>
										<td>${product.internal_hd.meanAccessTime}</td>
									</tr>
									<tr>
										<td>Fabrikant:</td>
										<td> ${product.internal_hd.manufacturer}</td>
									</tr>
									<tr>
										<td>Business Entity:</td>
										<td> ${product.internal_hd.businessEntity}</td>
									</tr>
									<tr>
										<td>Type:</td>
										<td> ${product.internal_hd.type}</td>
									</tr>
									<tr>
										<td>Hardeschijf cache:</td>
										<td> ${product.internal_hd.cache} MB</td>
									</tr>
									<tr>
										<td>Rotatiesnelheid:</td>
										<td> ${product.internal_hd.rpm} RPM</td>
									</tr>
							</table>
							</div>
						</c:forEach>					
					</div>
					
					<br class="clearfix" />
				</div>
				<div id="sidebar">
									<div class="box" >
					<h3>Mijn Account</h3>
								<c:choose>
									<c:when test="${firstname != null}">
									Welkom, <a href="account" ><c:out value="${firstname}"></c:out></a>
									</c:when>
									<c:when test="${firstname == null}">
									Log nu in !
									</c:when>
								</c:choose>
					</div>
					<div class="box">
						<h3>contact</h3>
						<p>
							Neem contact op door <a href="mailto:info@notebookshop.com">hier</a> te klikken.
						</p>
					</div>
				</div>
				<br class="clearfix" />
			</div>
		</div>
		<div id="footer">
			
		</div>
	</body>
</html>